<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	request.setCharacterEncoding("UTF-8");
	String cp = request.getContextPath(); 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="<%=cp%>/data/css/common.css" rel="stylesheet" type="text/css" />
<link href="<%=cp%>/community/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=cp%>/community/css/board.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="<%=cp%>/info/css/created.css" type="text/css"/>
<script type="text/javascript" src="<%=cp%>/board/js/util.js"></script>
<script type="text/javascript">
    function sendIt() {
        f = document.myForm;

    	str = f.subject.value;
    	str = str.trim();
        if(!str) {
            alert("\n제목을 입력하세요. ");
            f.subject.focus();
            return;
        }
    	f.subject.value = str;
    	
    	str = f.area.value;
	    str = str.trim();
        if(!str) {
            alert("지역을 입력하세요. ");
            f.area.focus();
            return;
        }
    	f.area.value = str;
    	
    	str = f.content.value;
	    str = str.trim();
        if(!str) {
            alert("내용을 입력하세요. ");
            f.content.focus();
            return;
        }
    	f.content.value = str;
    	
    	if(f.mode.value == "created"){
    		f.action = "<%=cp%>/community/write.action";
    	}else if(f.mode.value == "updated"){
    		f.action = "<%=cp%>/community/updated.action";
    	}
    	
        f.submit();
    }

</script>

</head>
<body>
<form name="myForm" method="post" action="">
<!-- Container -->
	<div id="container">
		<div id="subNavigation">
			<h2><img src="<%=cp%>/community/image/h2_community.gif" alt="커뮤니티" /></h2>
			<ul class="leftMenu">
                <li><a href='<%=cp%>/community/hugi.action'><img src='<%=cp%>/community/image/subnavi_community1_on.gif' class='imgover' alt='여행후기' /></a></li>
                <li><a href='<%=cp%>/community/gallary.action'><img src='<%=cp%>/community/image/photo.gif' class='imgover' alt='포토갤러리' /></a></li>
                <li><a href='<%=cp%>/community/event.action'><img src='<%=cp%>/community/image/subnavi_community2_on.gif' class='imgover' alt='진행중인 이벤트' /></a></li>
                <li><a href='<%=cp%>/community/e_list.action'><img src='<%=cp%>/community/image/subnavi_community3_on.gif' alt='당첨자발표' /></a></li>
			</ul>
			<ul class="boardLink">
				<li><a href="<%=cp%>/info/s_created.action"><img src="<%=cp%>/community/image/main_qna.gif" alt="질문과 답변" /></a></li>
				<li><a href="<%=cp%>/info/qna.action"><img src="<%=cp%>/community/image/main_faq.gif" alt="자주하는 질문" /></a></li>
			</ul>
		</div>
		<!-- Sub Navigation //-->
		<div id="contents">			
			<div class="titleArea">
				<h3><img src="<%=cp%>/community/image/h2_travel_review.gif" alt="여행후기" /><span class="visualImg"><img src="<%=cp%>/community/image/img_visual.gif"  alt="비주얼이미지" /></span></h3>
			</div>
 
			<table cellpadding="0" cellspacing="0" class="tbViewType1" summary="여행후기" width="100%">
				<caption></caption>
				<colgroup>
					<col width="15%" />
					<col width="*" />
					<col width="15%" />
					<col width="15%" />
				</colgroup>
				<tbody>
				    <tr>
						<th><img src="<%=cp%>/info/image/subject2.bmp" alt="제목" /></th>
						<td colspan="3">
							<input class="type_text2" type="text" size="80" name="subject" value="${dto.subject}"/>							
						</td>
					</tr>
					<tr>
						<th><img src="<%=cp%>/info/image/area.gif" alt="지역" /></th>
						<td colspan="3">
							<input class="type_text2" type="text" size="40" name="area" value="${dto.area}"/>	
						</td>
					</tr>
					<tr>
						<td colspan="4" class="pad3">
							<div class=" inquiryBoard">
								<textarea name="content" rows="1" cols="1" class="textEntry">${dto.content}</textarea>
							</div>
						</td> 
					</tr>
				</tbody>
			</table>
 
			<div class="btnType1">
				<input type="hidden" name="pageNum" value="${pageNum}"/>
				<input type="hidden" name="searchKey" value="${searchKey}"/>
				<input type="hidden" name="searchValue" value="${searchValue}"/>
				<input type="hidden" name="boardNum" value="${boardNum}"/>
				<input type="hidden" name="mode" value="${mode}"/>
					<span class="right"><a href="javascript:sendIt()"><img src="<%=cp%>/info/image/regist.gif" alt="등록하기 " /></a></span>
	                <a href="javascript:location.href='<%=cp%>/community/hugi.action'">
	                <img src="<%=cp%>/info/image/list.gif" alt="돌아가기" /></a>
			</div>  
		</div>

	<!-- Contents //-->
 
		
	</div>
	<!-- Container //-->
</form>
</body>
</html>